Skip to content

Fix rate limiter documentation for default burst value#2925

Merged
aldas merged 1 commit intolabstack:masterfrom
karesansui-u:fix/rate-limiter-burst-doc
Mar 29, 2026
Merged

Fix rate limiter documentation for default burst value#2925
aldas merged 1 commit intolabstack:masterfrom
karesansui-u:fix/rate-limiter-burst-doc

Conversation

@karesansui-u
Copy link
Copy Markdown
Contributor

The documentation for NewRateLimiterMemoryStore and
NewRateLimiterMemoryStoreWithConfig states that the default Burst
value is the "rounded down" value of the rate. This was accurate when
the documentation was added in #2366, where the code used int(config.Rate).

However, #2852 changed the default burst calculation to use math.Ceil,
making it the rounded up value. The documentation was not updated to
reflect this change.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.01%. Comparing base (19364e2) to head (89c1820).
⚠️ Report is 8 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2925   +/-   ##
=======================================
  Coverage   93.01%   93.01%           
=======================================
  Files          43       43           
  Lines        4496     4498    +2     
=======================================
+ Hits         4182     4184    +2     
  Misses        196      196           
  Partials      118      118           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@aldas aldas merged commit 3f50cc6 into labstack:master Mar 29, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants